﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
    <script language="javascript">
        function reportFunds() {
            var value = Amount.value;
            if (isNaN(value) || value == null || value.length == 0) {
                alert('Not a valid amount. Please try again.');
            }
            else {
                window.navigate('Money.htm?amount=' + Amount.value);
            }
        }

        function notifySuccess() {
            var amt = getParameterByName('amount');
            if (amt != null && amt.length > 0)
            {
                alert('Successfully posted $' + amt + '.');
            }
        }

        function getParameterByName(name) {
            name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
            var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
                results = regex.exec(location.search);
            return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
        }
    </script>
</head>
<body onload="notifySuccess();">
    <p>Enter the amount of funds received:</p>
    <input id="Amount" type="text" size="20" />
    <button title="Submit" onclick="reportFunds();">Submit</button>
</body>
</html>